from fdfs_client.client import Fdfs_client
# 2. 创建FastDFS客户端实例
client = Fdfs_client('client.conf')
# 3. 调用FastDFS客户端上传文件方法
ret = client.upload_by_filename(r'C:\Users\apple\Desktop\cat.jpg')

print(ret)

'''
{
    'Group name': 'group1',
     'Remote file_id': 'group1\\M00/00/00/CiSUEV-yHwGANNL3AAAQ7colEzw914.jpg', 
     'Status': 'Upload successed.', 
     'Local file name': 'C:\\Users\\apple\\Desktop\\cat.jpg', 
     'Uploaded size': '4.00KB', 
     'Storage IP': '10.36.148.17'
}

'''